#ifndef BACKGROUND_HPP_INCLUDED
#define BACKGROUND_HPP_INCLUDED

#define BORDER_LEFT 75
#define BORDER_RIGHT 100
#define BORDER_DOWN 50
#define BORDER_UP 100

#include "../../define.hpp"
#include "../../DK_File/DK_File.hpp"
#include <SFML\Graphics\Drawable.hpp>
#include "../../ressource/RessourceManager.hpp"
#include "../../ressource/ImageRessource.hpp"

enum BackgroundType
{
    BACKGROUND,
	MAP,
	FOREGROUND
};

class Background : public sf::Drawable
{
    public:

	// Constructor
    Background(RessourceManager* ressourceManagerPtr = 0);

    bool Load(const std::string filename, BackgroundType type);

	// Return Size
	sf::Vector2i Size();

	// Return Background Type
    BackgroundType Type();

    // Function To scroll Background
    void Scrolling(int view_X,int Carte_X);

    private:

	virtual void Render(sf::RenderTarget& App) const;


    //std::vector< std::pair<sf::Image, sf::Sprite> > m_Image;
	std::vector< std::pair<ImageRessource*, sf::Sprite*> > m_listRessource;

	// Size Background
    sf::Vector2i m_size;

	// Background Type
    BackgroundType m_type;

	// Pointer to ressource manager
	RessourceManager* m_ressourceManager;
};
#endif // BACKGROUND_HPP_INCLUDED
